﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Mrhd.Core.Entities
{
    /// <summary>
    /// 商品图片表
    /// </summary>
    [Table("Sys_ProductImage")]
    [Comment("商品图片表")]
    public class ProductImageEntity : Entity
    {
        /// <summary>
        /// 图片url
        /// </summary>
        [MaxLength(64)]
        [Comment("图片url")]
        public string Name { get; set; }
        /// <summary>
        /// 大图
        /// </summary>
        [NotMapped]
        public string Big { get; set; }
        /// <summary>
        /// 小图
        /// </summary>
        [NotMapped]
        public string Small { get; set; }
        /// <summary>
        /// 商品id
        /// </summary>
        [Comment("商品id")]
        public int ProductId { get; set; }
        /// <summary>
        /// 所属商品实体
        /// </summary>
        public virtual ProductEntity Product { get; set; }

    }
}
